<title>LPhoto</title>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width,initial-scale=1.0, user-scalable=no">
<meta name="_xsrf" content="{{.xsrf_token}}" />
<link rel="stylesheet" href="/static/layui/css/layui.css">
<link rel="stylesheet" href="/static/css/base.css">
<script src="/static/js/vue.min.js"></script>
<script src="/static/layui/layui.all.js"></script>
<script src="/static/js/valid.js"></script>
<script src="/static/js/view.js"></script>
<script src="/static/js/axios.min.js"></script>
<script>
    //请求拦截器
    axios.interceptors.request.use(function(config){
        //在请求发出之前进行一些操作
        console.log("你已经被我拦截了");
        config.headers['X-Xsrftoken'] = document.getElementsByTagName('meta')['_xsrf']['content'];
        return config;
    },function(err){
        //Do something with request error
        return Promise.reject(error);
    });
    //响应拦截器
    axios.interceptors.response.use(function (response) {
        return response;
    }, function (error) {
        showMsg(error);
        return Promise.reject(error);
    });

</script>